From: Glenn Morris Date: Tue, 1 Sep 2009 03:26:32 +0000 (+0000) Subject: (etags-goto-tag-location): Use forward-line rather than goto-line. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~10725 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=142f9bd0345dd9eec49b1030febc8acc82b60165;p=emacs.git (etags-goto-tag-location): Use forward-line rather than goto-line. --- diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index f3ffa1c2d91..7a557e95974 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1,8 +1,8 @@ ;;; etags.el --- etags facility for Emacs ;; Copyright (C) 1985, 1986, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1998, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -;; Free Software Foundation, Inc. +;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; Free Software Foundation, Inc. ;; Author: Roland McGrath ;; Maintainer: FSF @@ -1331,7 +1331,8 @@ hits the start of file." offset found pat) (if (eq (car tag-info) t) ;; Direct file tag. - (cond (line (goto-line line)) + (cond (line (progn (goto-char (point-min)) + (forward-line (1- line)))) (startpos (goto-char startpos)) (t (error "etags.el BUG: bogus direct file tag"))) ;; This constant is 1/2 the initial search window. @@ -1349,7 +1350,8 @@ hits the start of file." ;; If no char pos was given, try the given line number. (or startpos (if line - (setq startpos (progn (goto-line line) + (setq startpos (progn (goto-char (point-min)) + (forward-line (1- line)) (point))))) (or startpos (setq startpos (point-min)))